<?php

//Route::group(['namespace'=>'App\Http\Controllers\Api\Task','prefix'=>'api','middleware'=>'WebAuth'],function(){

Route::group(['namespace'=>'App\Http\Controllers\Api\Task','prefix'=>'api'],function(){

	/*******************发布任务******************/
	//获取任务列表
    Route::any('task/get_list', 'TaskController@getList');
    //获取单个任务
    Route::any('task/get_task', 'TaskController@getTask');

    //控糖达标任务 定时任务脚本
    Route::any('task/manual/sugar', 'TaskController@taskSugar');
});

//登录中间件
Route::group(['namespace'=>'App\Http\Controllers\Api\Task','prefix'=>'api','middleware'=>'WebAuth'],function(){
    //领取任务
    Route::post('task/add_draw_task', 'TaskController@addDrawTask');
    //任务头部
    Route::any('task/glucose_rate', 'TaskController@glucoseRate');
});